package com.atguigu.gulimallcart.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimallcart.vo.SkuInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient("gulimall-product")
public interface ProductFeignService {

    @RequestMapping("/product/skuinfo/info/{skuId}")
    R<SkuInfoVo> info(@PathVariable("skuId") Long skuId);

    @RequestMapping("/product/skusaleattrvalue/attr/{skuId}")
    R<List<String>> getSkuAttr(@RequestParam("skuId") Long skuId);

    @RequestMapping("/product/skuinfo/price")
    BigDecimal getPrice(@RequestParam("skuId") Long skuId);
}
